/* 全局样式 */
:root {
    --primary-color: #1e88e5;
    --secondary-color: #43a047;
    --accent-color: #ff9800;
    --dark-color: #212121;
    --light-color: #f5f5f5;
    --text-color: #333;
    --light-text: #fff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.primary-btn:hover {
    background-color: #1565c0;
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: var(--light-text);
}

.secondary-btn:hover {
    background-color: #2e7d32;
    transform: translateY(-2px);
}

/* 头部样式 */
header {
    background-color: var(--dark-color);
    color: var(--light-text);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
}

.club-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

header h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--light-text);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

nav ul li a:hover, nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

/* 英雄区域样式 */
.hero {
    height: 60vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1508098682722-e99c43a406b2?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: var(--light-text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
}

.hero-content {
    max-width: 800px;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 主要内容区域 */
main {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.5rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--accent-color);
}

/* 球员卡片样式 */
.player-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.player-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.player-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.player-image {
    height: 250px;
    overflow: hidden;
}

.player-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.player-card:hover .player-image img {
    transform: scale(1.05);
}

.player-info {
    padding: 1.5rem;
}

.player-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.player-info .player-position {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--light-text);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.player-info .player-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-left: 0.5rem;
}

.player-info p {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* 球员详情页样式 */
.player-details {
    background-color: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.player-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.player-header-image {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 2rem;
    box-shadow: var(--shadow);
}

.player-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-header-info h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: left;
}

.player-header-info h2::after {
    display: none;
}

.player-header-info .player-number-large {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-right: 1rem;
}

.player-header-info .player-position-large {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
}

.player-bio {
    margin-bottom: 2rem;
}

.player-bio h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.player-bio p {
    line-height: 1.8;
}

.player-stats h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-color);
}

.back-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: 5px;
    font-weight: bold;
    transition: var(--transition);
}

.back-button:hover {
    background-color: #1565c0;
    transform: translateY(-2px);
}

/* 管理页面样式 */
.admin-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.player-form {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.player-form h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.stats-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.form-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.player-list-container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.player-list-container h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.player-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.player-list-item {
    display: flex;
    align-items: center;
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.player-list-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
}

.player-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-list-info {
    flex-grow: 1;
}

.player-list-info h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.player-list-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-btn, .delete-btn {
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.edit-btn {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.edit-btn:hover {
    background-color: #1565c0;
}

.delete-btn {
    background-color: #e53935;
    color: var(--light-text);
}

.delete-btn:hover {
    background-color: #c62828;
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    color: var(--light-text);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.club-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.8rem;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.footer-logo h3 {
    font-size: 1.5rem;
}

.footer-links h4, .footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    color: var(--light-text);
}

.footer-links ul li a:hover {
    color: var(--accent-color);
}

.footer-contact p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.footer-contact p i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo-container {
        margin-bottom: 1rem;
    }
    
    nav ul li {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    .hero {
        height: 50vh;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .player-header {
        flex-direction: column;
        text-align: center;
    }
    
    .player-header-image {
        margin-right: 0;
        margin-bottom: 1.5rem;
    }
    
    .player-header-info h2 {
        text-align: center;
    }
    
    .admin-controls {
        flex-direction: column;
    }
    
    .stats-inputs {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .stats-inputs {
        grid-template-columns: 1fr;
    }
    
    .player-list {
        grid-template-columns: 1fr;
    }
}

/* 编辑表单样式 */
.edit-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.edit-form-container {
    background-color: #fff;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    padding: 2rem;
    position: relative;
}

.close-form {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* 确认删除对话框 */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.confirm-box {
    background-color: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
}

.confirm-box h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.confirm-box p {
    margin-bottom: 1.5rem;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.confirm-delete {
    background-color: #e53935;
    color: var(--light-text);
}

.confirm-delete:hover {
    background-color: #c62828;
}

.cancel-delete {
    background-color: #9e9e9e;
    color: var(--light-text);
}

.cancel-delete:hover {
    background-color: #757575;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 1001;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background-color: var(--secondary-color);
}

.notification.error {
    background-color: #e53935;
}
